package com.zxy.controller;

import com.zxy.entity.Order;
import com.zxy.result.CommonResult;
import com.zxy.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: Zxy
 * @description: 订单控制层
 * @date: 2021-08-21 10:59
 */
@RestController
public class OrderController {

    @Resource
    private OrderService orderService;

    @GetMapping("/order/create")
    public CommonResult create(Order order){
        orderService.create(order);
        return new CommonResult(200,"订单创建成功");
    }
}
